package com.mmd.admin.model.pojo.request;

import com.mmd.base.annotation.valid.group.ValidGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@ApiModel("协议编辑")
public class ProtocolEditParam {

    @ApiModelProperty("协议id")
    @NotNull(message = "协议id不能为空",groups = {ValidGroup.Insert.class,ValidGroup.Update.class})
    private Long id;

    @ApiModelProperty(value = "标题")
    @NotBlank(message = "标题不能为空",groups = {ValidGroup.Insert.class,ValidGroup.Update.class})
    @Length(max = 20,message = "标题字数超限20")
    private String title;

    @NotBlank(message = "内容不能为空",groups = {ValidGroup.Insert.class,ValidGroup.Update.class})
    @ApiModelProperty(value = "内容")
    private String content;

}
